package com.wyp.service.impl;

import com.wyp.mapper.ExamineesMapper;
import com.wyp.pojo.Examinees;
import com.wyp.service.ExamineesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ExamineesServiceImpl implements ExamineesService {

    @Autowired
    private ExamineesMapper examineesMapper;

    @Override
    public Map<String,Object> findByStuaccount(String stuaccount) {
        return examineesMapper.findByStuaccount(stuaccount);
    }

    @Override
    public List<Map<String,Object>> qureyAllExaminees() {
        return examineesMapper.qureyAllExaminees();
    }

    @Override
    public List<Map<String,Object>> qureyExamineesByStuname(String stuname) {
        return examineesMapper.qureyExamineesByStuname(stuname);
    }

    @Override
    public List<Map<String,Object>> qureyExamineesByStuaccount(String stuaccount) {
        return examineesMapper.qureyExamineesByStuaccount(stuaccount);
    }

    @Override
    public boolean addExaminees(Examinees examinees) {
        return (examineesMapper.addExaminees(examinees) != 0);
    }

    @Override
    public boolean updateExaminees(Examinees examinees) {
        return (examineesMapper.updateExaminees(examinees) != 0);
    }

    @Override
    public boolean deleteExaminees(Integer id) {
        return (examineesMapper.deleteExaminees(id) != 0);
    }
}
